compiled: HashSet<&'a PackageId>,
documented: HashSet<&'a PackageId>,
counts: HashMap<&'a PackageId, usize>,
+ is_release: bool,
+ is_doc_all: bool,
}
/// A helper structure for metadata about the state of a building package.
compiled: HashSet::new(),
documented: HashSet::new(),
counts: HashMap::new(),
+ is_release: cx.build_config.release,
+ is_doc_all: cx.build_config.doc_all,
}
}
fn drain_the_queue(&mut self, cx: &mut Context, scope: &Scope<'a>)
-> CargoResult<()> {
+ use std::time::Instant;
+
let mut queue = Vec::new();
trace!("queue: {:#?}", self.queue);
// successful and otherwise wait for pending work to finish if it failed
// and then immediately return.
let mut error = None;
+ let start_time = Instant::now();
loop {
while error.is_none() && self.active < self.jobs {
if !queue.is_empty() {
}
}
+ let build_type = if self.is_release { "release" } else { "debug" };
+ let profile = cx.lib_profile(cx.resolve.root());
+ let mut opt_type = String::from(if profile.opt_level > 0 { "optimized" }
+ else { "unoptimized" });
+ if profile.debuginfo {
+ opt_type = opt_type + " + debuginfo";
+ }
+ let duration = start_time.elapsed();
+ let time_elapsed = format!("{}.{1:.2} secs",
+ duration.as_secs(),
+ duration.subsec_nanos() / 10000000);
if self.queue.is_empty() {
+ if !self.is_doc_all {
+ try!(cx.config.shell().status("Finished", format!("{} [{}] target(s) in {}",
+ build_type,
+ opt_type,
+ time_elapsed)));
+ }
Ok(())
} else if let Some(e) = error {
Err(e)
execs().with_status(0).with_stderr("\
warning: unused manifest key: target.foo.bar
[COMPILING] foo v0.1.0 (file:///[..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
it. A newline needs to be added and this warning will soon become a hard error
in the future.
[COMPILING] empty_deps v0.0.0 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
assert_that(p.cargo("bench"),
execs().with_stderr(&format!("\
[COMPILING] foo v0.5.0 ({})
+[FINISHED] release [optimized] target(s) in [..]
[RUNNING] target[..]release[..]foo-[..]", p.url()))
.with_stdout("
running 1 test
execs().with_status(0)
.with_stderr(format!("\
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] release [optimized] target(s) in [..]
[RUNNING] target[..]release[..]bin2[..]
", dir = prj.url()))
.with_stdout("
execs().with_stderr(&format!("\
[COMPILING] foo v0.5.0 ({url})
[RUNNING] `rustc src[..]foo.rs [..]`
+[FINISHED] release [optimized] target(s) in [..]
[RUNNING] `[..]target[..]release[..]foo-[..] hello --bench`", url = p.url()))
.with_stdout("
running 1 test
test bench_hello ... ")
.with_stderr_contains(format!("\
[COMPILING] foo v0.5.0 ({})
+[FINISHED] release [optimized] target(s) in [..]
[RUNNING] target[..]release[..]foo-[..]
thread '[..]' panicked at 'assertion failed: \
`(left == right)` (left: \
assert_that(p.cargo_process("bench"),
execs().with_stderr(&format!("\
[COMPILING] foo v0.0.1 ({})
+[FINISHED] release [optimized] target(s) in [..]
[RUNNING] target[..]release[..]baz-[..]
[RUNNING] target[..]release[..]foo-[..]", p.url()))
.with_stdout("
.with_stderr(&format!("\
[COMPILING] foo v0.0.1 ([..])
[COMPILING] bar v0.0.1 ({dir})
+[FINISHED] release [optimized] target(s) in [..]
[RUNNING] target[..]", dir = p.url()))
.with_stdout("
running 1 test
assert_that(p.cargo_process("bench"),
execs().with_stderr(&format!("\
[COMPILING] foo v0.0.1 ({})
+[FINISHED] release [optimized] target(s) in [..]
[RUNNING] target[..]release[..]bench-[..]
[RUNNING] target[..]release[..]foo-[..]", p.url()))
.with_stdout("
assert_that(p.cargo_process("bench"),
execs().with_stderr(&format!("\
[COMPILING] foo v0.0.1 ({})
+[FINISHED] release [optimized] target(s) in [..]
[RUNNING] target[..]release[..]external-[..]
[RUNNING] target[..]release[..]foo-[..]", p.url()))
.with_stdout("
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] release [optimized] target(s) in [..]
[RUNNING] target[..]release[..]foo-[..]", dir = p.url()))
.with_stdout("
running 1 test
assert_that(p.cargo("bench").arg("foo"),
execs().with_status(0)
- .with_stderr("\
+ .with_stderr("[FINISHED] release [optimized] target(s) in [..]
[RUNNING] target[..]release[..]foo-[..]")
.with_stdout("
running 1 test
assert_that(p.cargo_process("bench"),
execs().with_stderr(&format!("\
[COMPILING] foo v0.0.1 ({})
+[FINISHED] release [optimized] target(s) in [..]
[RUNNING] target[..]release[..]foo-[..]
[RUNNING] target[..]release[..]foo-[..]", p.url()))
.with_stdout("
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] syntax v0.0.1 ({dir})
+[FINISHED] release [optimized] target(s) in [..]
[RUNNING] target[..]release[..]bench-[..]
[RUNNING] target[..]release[..]syntax-[..]", dir = p.url()))
.with_stdout("
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] syntax v0.0.1 ({dir})
+[FINISHED] release [optimized] target(s) in [..]
[RUNNING] target[..]release[..]syntax-[..]", dir = p.url()))
.with_stdout("
running 1 test
[RUNNING] [..] -C opt-level=3 [..]
[RUNNING] [..] -C opt-level=3 [..]
[RUNNING] [..] -C opt-level=3 [..]
+[FINISHED] release [optimized] target(s) in [..]
[RUNNING] [..]target[..]release[..]bench-[..]
[RUNNING] [..]target[..]release[..]foo-[..]", dir = p.url()))
.with_stdout("
.with_stderr(&format!("\
[FRESH] bar v0.0.1 ({dir}/bar)
[FRESH] foo v0.0.1 ({dir})
+[FINISHED] release [optimized] target(s) in [..]
[RUNNING] [..]target[..]release[..]bench-[..]
[RUNNING] [..]target[..]release[..]foo-[..]", dir = p.url()))
.with_stdout("
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] release [optimized] target(s) in [..]
[RUNNING] target[..]release[..]foo-[..]", dir = p.url()))
.with_stdout("
running 1 test
assert_that(p.cargo("bench"),
execs().with_status(0)
- .with_stderr("\
+ .with_stderr("[FINISHED] release [optimized] target(s) in [..]
[RUNNING] target[..]release[..]foo-[..]")
.with_stdout("
running 1 test
[RUNNING] `rustc [..]`
[RUNNING] `rustc [..]`
[RUNNING] `rustc [..]`
+[FINISHED] release [optimized] target(s) in [..]
[RUNNING] `{dir}[..]target[..]release[..]testb1-[..] --bench`
[RUNNING] `{dir}[..]target[..]release[..]testbench-[..] --bench`",
dir = p.root().display(), url = p.url()))
execs().with_status(0)
.with_stderr("\
[COMPILING] foo v0.1.0 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]debug[..]b-[..]")
.with_stdout("
running 1 test
execs().with_status(0)
.with_stderr("\
[COMPILING] foo v0.1.0 ([..])
+[FINISHED] release [optimized] target(s) in [..]
"));
}
--emit=dep-info,link \
-L dependency={dir}{sep}target{sep}debug \
-L dependency={dir}{sep}target{sep}debug{sep}deps`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", sep = SEP,
dir = p.root().display(), url = p.url(),
name = "foo", version = "0.0.1")
[..]
[..]
[RUNNING] `rustc [..] --crate-name foo [..] -L foo -L bar[..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
[COMPILING] foo v0.5.0 (file://[..])
[RUNNING] `[..]build-script-build[..]`
[RUNNING] `rustc [..] --crate-name foo [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
[RUNNING] `[..]build-script-build[..]`
[RUNNING] `rustc [..] --crate-name foo [..]`
[RUNNING] `rustc [..] --crate-name foo [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `[..]foo-[..][..]`
[DOCTEST] foo
[RUNNING] `rustdoc --test [..]`")
execs().with_status(0)
.with_stderr("\
[COMPILING] foo v0.5.0 (file://[..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `target[..]foo[..]`
"));
}
[RUNNING] `rustc build.rs [..] --extern a=[..]`
[RUNNING] `[..]foo-[..]build-script-build[..]`
[RUNNING] `rustc [..] --crate-name foo [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
[RUNNING] `rustc [..]lib.rs --crate-name foo --crate-type lib -g \
--out-dir [..]target[..]debug --emit=dep-info,link \
-L [..]target[..]debug -L [..]target[..]deps`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
execs().with_status(0)
.with_stderr("\
[COMPILING] foo v0.5.0 (file://[..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `target[..]foo`")
.with_stdout("\
Hello, World!
[RUNNING] [..] --cfg foo[..]
[RUNNING] [..] --cfg foo[..]
[RUNNING] [..] --cfg foo[..]
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] [..]foo-[..]
[RUNNING] [..]test-[..]
[DOCTEST] foo
[RUNNING] `[..]`
[RUNNING] `[..]`
[RUNNING] `[..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] [..]foo-[..]
[RUNNING] [..]test-[..]
[DOCTEST] foo
[COMPILING] foo v0.5.0 ([..]
[RUNNING] `rustc src[..]lib.rs [..] -L test[..]`
[RUNNING] `rustc tests[..]foo.rs [..] -L test[..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `[..]foo-[..]`")
.with_stdout("
running 0 tests
[FRESH] a v0.5.0 ([..]
[COMPILING] b v0.5.0 ([..]
[RUNNING] `rustc b[..]src[..]lib.rs [..] -L test[..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `[..]b-[..]`")
.with_stdout("
running 0 tests
[RUNNING] `rustc [..]`
[COMPILING] foo v0.5.0 ([..]
[RUNNING] `[..]rlib -L native=test`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
[RUNNING] `rustc [..]`
[RUNNING] `[..]`
[RUNNING] `rustc [..] -L native=foo`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
File::create(p.root().join(".cargo/config")).unwrap().write_all(format!("
execs().with_status(0).with_stderr("\
[COMPILING] foo v0.5.0 ([..]
[RUNNING] `rustc [..] -L native=bar`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
execs().with_status(0).with_stderr("\
[COMPILING] foo v0.5.0 ([..]
[RUNNING] `rustc [..] -L native=foo`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
File::create(p.root().join(".cargo/config")).unwrap().write_all(format!("
execs().with_status(0).with_stderr("\
[COMPILING] foo v0.5.0 ([..]
[RUNNING] `rustc [..] -L native=bar`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
[COMPILING] a v0.5.0 ([..])
[RUNNING] `[..]build-script-build[..]`
[RUNNING] `rustc src[..]lib.rs [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
sleep_ms(1000);
[COMPILING] a v0.5.0 ([..])
[RUNNING] `[..]build-script-build[..]`
[RUNNING] `rustc src[..]lib.rs [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
println!("run with2");
assert_that(p.cargo("build").arg("-v"),
execs().with_status(0).with_stderr("\
[FRESH] a v0.5.0 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
sleep_ms(1000);
assert_that(p.cargo("build").arg("-v"),
execs().with_status(0).with_stderr("\
[FRESH] a v0.5.0 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
// but changing dependent files does
[COMPILING] a v0.5.0 ([..])
[RUNNING] `[..]build-script-build[..]`
[RUNNING] `rustc src[..]lib.rs [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
// .. as does deleting a file
[COMPILING] a v0.5.0 ([..])
[RUNNING] `[..]build-script-build[..]`
[RUNNING] `rustc src[..]lib.rs [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
warning: foo
warning: bar
[RUNNING] `rustc [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
[RUNNING] `rustc [..]`
[COMPILING] foo v0.5.0 ([..])
[RUNNING] `rustc [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
[RUNNING] `rustc [..]`
[COMPILING] foo v0.5.0 ([..])
[RUNNING] `rustc [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
[RUNNING] `[..]`
stderr
[RUNNING] `rustc [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
.with_stderr("\
warning: unused manifest key: project.bulid
[COMPILING] foo [..]
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
let mut p = project("bar");
.with_stderr("\
warning: unused manifest key: lib.build
[COMPILING] foo [..]
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
--emit=dep-info,link \
-L dependency={dir}[..]target[..]release \
-L dependency={dir}[..]target[..]release[..]deps`
+[FINISHED] release [optimized] target(s) in [..]
",
dir = p.root().display(),
url = p.url(),
--emit=dep-info,link \
-L dependency={dir}[..]target[..]debug \
-L dependency={dir}[..]target[..]debug[..]deps`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
",
dir = p.root().display(),
url = p.url(),
--emit=dep-info,link \
-L dependency={dir}[..]target[..]release \
-L dependency={dir}[..]target[..]release[..]deps`
+[FINISHED] release [optimized] target(s) in [..]
",
dir = p.root().display(),
url = p.url(),
--extern foo={dir}[..]target[..]release[..]deps[..]\
{prefix}foo-[..]{suffix} \
--extern foo={dir}[..]target[..]release[..]deps[..]libfoo-[..].rlib`
+[FINISHED] release [optimized] target(s) in [..]
",
dir = p.root().display(),
url = p.url(),
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] syntax v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
",
dir = p.url())));
}
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] foo v0.0.0 ({url})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", url = foo.url())));
// Smoke test to make sure it doesn't compile again
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] foo v0.0.0 ({url})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", url = foo.url())));
File::create(&foo.root().join("src/bar.rs")).unwrap();
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] foo v0.0.0 ({url})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", url = foo.url())));
}
--emit=dep-info,link \
-L dependency=[..]target[..]debug \
-L dependency=[..]target[..]debug[..]deps`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
.file("src/lib.rs", "");
assert_that(p.cargo_process("build"),
execs().with_status(0)
- .with_stderr("[..] foo v0.0.1 ([..])\n"));
+ .with_stderr("[..] foo v0.0.1 ([..])\n\
+ [FINISHED] debug [unoptimized + debuginfo] target(s) in [..]\n"));
}
execs().with_status(0)
.with_stderr("\
[COMPILING] foo v0.5.0 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
let macros = [
("[RUNNING]", " Running"),
("[COMPILING]", " Compiling"),
+ ("[FINISHED]", " Finished"),
("[ERROR]", "error:"),
("[WARNING]", "warning:"),
("[DOCUMENTING]", " Documenting"),
assert_that(p.cargo_process("build"),
execs().with_status(0).with_stderr("\
[COMPILING] a v0.0.1 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
[COMPILING] foo v0.1.0 ([..])
[COMPILING] bar v0.1.0 ([..])
[COMPILING] a v0.0.1 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
assert_that(p.cargo("build").arg("--release"),
execs().with_status(0).with_stderr("\
[COMPILING] foo v0.0.1 ([..])
+[FINISHED] release [optimized] target(s) in [..]
"));
}
[RUNNING] `rustc build.rs [..]`
[RUNNING] `[..]build-script-build[..]`
[RUNNING] `rustc src[..]main.rs [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
assert_that(a, execs().with_status(0).with_stderr("\
[COMPILING] foo v0.0.0 [..]
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
assert_that(b, execs().with_status(0).with_stderr("\
[COMPILING] foo v0.0.0 [..]
+[FINISHED] release [optimized] target(s) in [..]
"));
}
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] foo v0.0.0 ({foo})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]{triple}[..]bar-[..]
[RUNNING] target[..]{triple}[..]foo-[..]", foo = p.url(), triple = target))
.with_stdout("
let host_output = format!("\
[COMPILING] foo v0.0.0 ({foo})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]foo-[..]
[DOCTEST] foo
", foo = p.url());
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] foo v0.0.0 ({foo})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]{triple}[..]foo-[..]
", foo = p.url(), triple = target)));
}
[RUNNING] `rustc build.rs [..] --out-dir {dir}[..]target[..]build[..]foo-[..]`
[RUNNING] `{dir}[..]target[..]build[..]foo-[..]build-script-build`
[RUNNING] `rustc src[..]main.rs [..] --target {target} [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", target = target,
dir = p.root().display())));
}
[RUNNING] `rustc build.rs [..]`
[RUNNING] `[..]build-script-build[..]`
[RUNNING] `rustc src[..]lib.rs [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
[RUNNING] `rustc build.rs [..]`
[RUNNING] `{dir}[..]target[..]build[..]foo-[..]build-script-build`
[RUNNING] `rustc src[..]lib.rs [..] --target {target} [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", dir = p.root().display(), target = target)));
}
execs().with_status(0).with_stderr(&format!("\
[COMPILING] bar v0.0.1 ({dir}/bar)
[DOCUMENTING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
",
dir = path2url(p.root()))));
assert_that(p.cargo_process("build"),
execs().with_status(0).with_stderr(format!("\
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", dir = p.url())));
assert_that(p.process(&p.bin("foo")),
execs().with_status(0).with_stdout(""));
execs().with_status(0).with_stderr(format!("\
[COMPILING] bar v0.0.1 ({dir}/bar)
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", dir = p.url())));
assert_that(p.process(&p.bin("foo")),
execs().with_status(0).with_stdout("bar\n"));
execs().with_status(0).with_stderr(format!("\
[COMPILING] bar v0.0.1 ({dir}/bar)
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", dir = p.url())));
assert_that(p.process(&p.bin("foo")),
execs().with_status(0).with_stdout("bar\n"));
assert_that(p.cargo("build").arg("--no-default-features"),
execs().with_status(0).with_stderr(format!("\
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", dir = p.url())));
assert_that(p.process(&p.bin("foo")),
execs().with_status(0).with_stdout(""));
[COMPILING] ba[..] v0.0.1 ({dir}/ba[..])
[COMPILING] ba[..] v0.0.1 ({dir}/ba[..])
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", dir = p.url())));
}
[COMPILING] ba[..] v0.0.1 ({dir}/ba[..])
[COMPILING] ba[..] v0.0.1 ({dir}/ba[..])
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", dir = p.url())));
}
[COMPILING] d2 v0.0.1 ({dir}/d2)
[COMPILING] d1 v0.0.1 ({dir}/d1)
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", dir = p.url())));
}
execs().with_status(0).with_stderr(format!("\
[COMPILING] a v0.1.0 ({dir}/a)
[COMPILING] b v0.1.0 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", dir = p.url())));
p.root().move_into_the_past();
execs().with_status(0).with_stderr("\
[FRESH] a v0.1.0 ([..]/a)
[FRESH] b v0.1.0 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
assert_that(p.cargo_process("build"),
execs().with_status(0).with_stderr("\
[COMPILING] test v0.1.0 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
assert_that(p.cargo_process("build"),
execs().with_status(0).with_stderr(format!("\
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", dir = path2url(p.root()))));
assert_that(p.cargo("build"),
assert_that(p.cargo("build"),
execs().with_status(0).with_stderr(format!("\
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", dir = path2url(p.root()))));
fs::rename(&p.root().join("src/a.rs"), &p.root().join("src/b.rs")).unwrap();
assert_that(p.cargo_process("build"),
execs().with_status(0).with_stderr(format!("\
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", dir = path2url(p.root()))));
assert_that(p.cargo("test"),
execs().with_status(0));
assert_that(p.cargo("build"),
execs().with_status(0).with_stderr(format!("\
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", dir = path2url(p.root()))));
assert_that(&p.bin("foo"), existing_file());
}
execs().with_status(0)
.with_stderr("\
[..]Compiling foo v0.0.1 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
assert_that(p.cargo("build").arg("--features").arg("foo"),
execs().with_status(0)
.with_stderr("\
[..]Compiling foo v0.0.1 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
assert_that(p.cargo("build"),
execs().with_status(0)
.with_stderr("\
[..]Compiling foo v0.0.1 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
assert_that(p.cargo("build"),
[COMPILING] c v0.0.1 ([..])
[COMPILING] b v0.0.1 ([..])
[COMPILING] foo v0.0.1 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
[COMPILING] c v0.0.1 ({dir}/c)
[COMPILING] b v0.0.1 ({dir}/b)
[COMPILING] a1 v0.0.1 ({dir}/a1)
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", dir = p.url())));
assert_that(p.cargo("build").cwd(p.root().join("a2")),
execs().with_status(0).with_stderr(&format!("\
[COMPILING] a2 v0.0.1 ({dir}/a2)
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", dir = p.url())));
}
execs()
.with_stderr(&format!("[UPDATING] git repository `{}`\n\
[COMPILING] dep1 v0.5.0 ({}#[..])\n\
- [COMPILING] foo v0.5.0 ({})\n",
+ [COMPILING] foo v0.5.0 ({})\n\
+ [FINISHED] debug [unoptimized + debuginfo] target(s) in [..]\n",
path2url(git_root.clone()),
path2url(git_root),
path2url(root))));
execs()
.with_stderr(&format!("[UPDATING] git repository `{}`\n\
[COMPILING] dep1 v0.5.0 ({}?branch=branchy#[..])\n\
- [COMPILING] foo v0.5.0 ({})\n",
+ [COMPILING] foo v0.5.0 ({})\n\
+ [FINISHED] debug [unoptimized + debuginfo] target(s) in [..]\n",
path2url(git_root.clone()),
path2url(git_root),
path2url(root))));
execs()
.with_stderr(&format!("[UPDATING] git repository `{}`\n\
[COMPILING] dep1 v0.5.0 ({}?tag=v0.1.0#[..])\n\
- [COMPILING] foo v0.5.0 ({})\n",
+ [COMPILING] foo v0.5.0 ({})\n\
+ [FINISHED] debug [unoptimized + debuginfo] target(s) in [..]\n",
path2url(git_root.clone()),
path2url(git_root),
path2url(root))));
assert_that(p.cargo_process("build"),
execs().with_stderr(&format!("[UPDATING] git repository `{}`\n\
[COMPILING] bar v0.5.0 ({}#[..])\n\
- [COMPILING] foo v0.5.0 ({})\n",
+ [COMPILING] foo v0.5.0 ({})\n\
+ [FINISHED] debug [unoptimized + debuginfo] target(s) \
+ in [..]\n",
git_project.url(),
git_project.url(),
p.url())));
println!("going for the last compile");
assert_that(p.cargo("build"),
execs().with_stderr(&format!("[COMPILING] bar v0.5.0 ({}#[..])\n\
- [COMPILING] foo v0.5.0 ({})\n",
+ [COMPILING] foo v0.5.0 ({})\n\
+ [FINISHED] debug [unoptimized + debuginfo] target(s) \
+ in [..]\n",
git_project.url(),
p.url())));
.arg("-p").arg("foo"),
execs().with_stdout(""));
assert_that(p.cargo("build"),
- execs().with_stderr(&format!("[COMPILING] foo v0.5.0 ({})\n",
+ execs().with_stderr(&format!("[COMPILING] foo v0.5.0 ({})\n\
+ [FINISHED] debug [unoptimized + debuginfo] target(s) \
+ in [..]\n",
p.url())));
}
[COMPILING] bar v0.5.0 ({git}#[..])
[COMPILING] [..] v0.5.0 ([..])
[COMPILING] [..] v0.5.0 ([..])
-[COMPILING] foo v0.5.0 ({dir})\n", git = git_project.url(), dir = p.url())));
+[COMPILING] foo v0.5.0 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]\n",
+git = git_project.url(), dir = p.url())));
// Modify a file manually, and commit it
File::create(&git_project.root().join("src/bar.rs")).unwrap().write_all(br#"
[COMPILING] bar v0.5.0 ({git}#[..])
[COMPILING] [..] v0.5.0 ({dir}[..]dep[..])
[COMPILING] [..] v0.5.0 ({dir}[..]dep[..])
-[COMPILING] foo v0.5.0 ({dir})\n",
+[COMPILING] foo v0.5.0 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]\n",
git = git_project.url(), dir = p.url())));
// We should be able to update transitive deps
execs().with_stderr("\
[UPDATING] git repository [..]
[COMPILING] dep1 [..]
-[COMPILING] foo [..]").with_status(0));
+[COMPILING] foo [..]
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]\n").with_status(0));
}
#[test]
[UPDATING] git repository `[..]`\n\
[COMPILING] [..] v0.5.0 ([..])\n\
[COMPILING] [..] v0.5.0 ([..])\n\
- [COMPILING] foo v0.5.0 ({})\n",
+ [COMPILING] foo v0.5.0 ({})\n\
+ [FINISHED] debug [unoptimized + debuginfo] target(s) in [..]\n",
project.url())));
File::create(&git1.root().join("src/lib.rs")).unwrap().write_all(br#"
[UPDATING] git repository `{bar}`
[COMPILING] bar v0.0.0 ({bar}#[..])
[COMPILING] foo v0.0.0 ({foo})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", bar = bar.url(), foo = foo.url())));
assert_that(foo.process(&foo.bin("foo")), execs().with_status(0));
}
.with_stderr("[UPDATING] git repository `[..]`\n\
[COMPILING] dep1 v0.5.0 ([..])\n\
[COMPILING] foo v0.5.0 ([..])\n\
+ [FINISHED] debug [unoptimized + debuginfo] target(s) in \
+ [..]\n\
[RUNNING] `target[..]foo[..]`\n")
.with_stdout("project2\n")
.with_status(0));
assert_that(project.cargo("run"), execs()
.with_stderr("[COMPILING] dep1 v0.5.0 ([..])\n\
[COMPILING] foo v0.5.0 ([..])\n\
+ [FINISHED] debug [unoptimized + debuginfo] target(s) in \
+ [..]\n\
[RUNNING] `target[..]foo[..]`\n")
.with_stdout("project3\n")
.with_status(0));
execs().with_stderr(&format!("\
[UPDATING] git repository `{bar}`
[COMPILING] foo v0.5.0 ({url})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", url = p.url(), bar = p2.url())));
// Make sure we use the previous resolution of `bar` instead of updating it
execs().with_stderr("\
[COMPILING] [..] v0.5.0 ([..])
[COMPILING] [..] v0.5.0 ([..]
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]foo-[..]")
.with_stdout("
running 1 test
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] foo v0.0.0 ({url})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", url = foo.url())));
// Smoke test to make sure it doesn't compile again
execs().with_stderr(&format!("\
[UPDATING] git repository `{bar}`
[COMPILING] foo v0.5.0 ({url})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", url = p.url(), bar = p2.url())));
}
[UPDATING] git repository `{bar}`
[COMPILING] [..]
[COMPILING] [..]
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", bar = bar.url())));
// Make a commit to lock p2 to a different rev
[UPDATING] git repository `{bar}`
[COMPILING] [..]
[COMPILING] [..]
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", bar = bar.url())));
// And now for the real test! Make sure that p1 doesn't get rebuilt
execs()
.with_stderr(&format!("[UPDATING] git repository `{}`\n\
[COMPILING] bar v0.5.0 ({}#[..])\n\
- [COMPILING] foo v0.5.0 ({})\n",
+ [COMPILING] foo v0.5.0 ({})\n\
+ [FINISHED] debug [unoptimized + debuginfo] target(s) in [..]\n",
bar.url(),
bar.url(),
p.url())));
[COMPILING] transitive [..]
[COMPILING] dep [..]
[COMPILING] project [..]
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", dep1.url(), transitive.url())));
// Update the dependency to point to the second repository, but this
[UPDATING] git repository `{}`
[COMPILING] dep [..]
[COMPILING] project [..]
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", dep2.url())));
}
[COMPILING] a v0.5.0 ([..]a1#[..]
[COMPILING] b v0.5.0 ([..])
[COMPILING] project v0.5.0 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
File::create(&p.root().join("b/Cargo.toml")).unwrap().write_all(format!(r#"
[COMPILING] a v0.5.1 ([..]a2#[..]
[COMPILING] b v0.5.0 ([..])
[COMPILING] project v0.5.0 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
[UPDATING] git repository `[..]`
[COMPILING] a v0.5.0 ([..])
[COMPILING] foo v0.0.1 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
[UPDATING] git repository `[..]`
[COMPILING] a v0.5.0 ([..])
[COMPILING] foo v0.0.1 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
[UPDATING] registry `[..]`
[DOWNLOADING] foo v0.0.1 (registry file://[..])
[COMPILING] foo v0.0.1 (registry file://[..])
+[FINISHED] release [optimized] target(s) in [..]
[INSTALLING] {home}[..]bin[..]foo[..]
warning: be sure to add `[..]` to your PATH to be able to run the installed binaries
",
[UPDATING] registry `[..]`
[DOWNLOADING] foo v0.0.2 (registry file://[..])
[COMPILING] foo v0.0.2 (registry file://[..])
+[FINISHED] release [optimized] target(s) in [..]
[INSTALLING] {home}[..]bin[..]foo[..]
warning: be sure to add `[..]` to your PATH to be able to run the installed binaries
",
assert_that(cargo_process("install").arg("--force").arg("--path").arg(p.root()),
execs().with_status(0).with_stderr(&format!("\
[COMPILING] foo v0.2.0 ([..])
+[FINISHED] release [optimized] target(s) in [..]
[REPLACING] {home}[..]bin[..]foo[..]
warning: be sure to add `[..]` to your PATH to be able to run the installed binaries
",
assert_that(cargo_process("install").arg("--force").arg("--path").arg(p.root()),
execs().with_status(0).with_stderr(&format!("\
[COMPILING] foo v0.2.0 ([..])
+[FINISHED] release [optimized] target(s) in [..]
[INSTALLING] {home}[..]bin[..]foo-bin3[..]
[REPLACING] {home}[..]bin[..]foo-bin2[..]
warning: be sure to add `[..]` to your PATH to be able to run the installed binaries
.arg(p.root()),
execs().with_status(0).with_stderr(&format!("\
[COMPILING] foo v0.2.0 ([..])
+[FINISHED] release [optimized] target(s) in [..]
[REPLACING] {home}[..]bin[..]foo-bin2[..]
warning: be sure to add `[..]` to your PATH to be able to run the installed binaries
",
execs().with_status(0).with_stderr(&format!("\
[UPDATING] git repository `[..]`
[COMPILING] foo v0.1.0 ([..])
+[FINISHED] release [optimized] target(s) in [..]
[INSTALLING] {home}[..]bin[..]foo[..]
warning: be sure to add `[..]` to your PATH to be able to run the installed binaries
",
assert_that(p.cargo_process("build").arg("--release"),
execs().with_status(0));
assert_that(cargo_process("install").arg("--path").arg(p.root()),
- execs().with_status(0).with_stderr("\
+ execs().with_status(0).with_stderr("[FINISHED] release [optimized] target(s) in [..]
[INSTALLING] [..]
warning: be sure to add `[..]` to your PATH to be able to run the installed binaries
"));
[UPDATING] git repository `[..]`
[COMPILING] foo v0.1.0 (file://[..])
[COMPILING] local v0.0.1 (file://[..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
[COMPILING] foo v0.1.0 (file://[..])
[COMPILING] bar v0.2.0 (registry [..])
[COMPILING] local v0.0.1 (file://[..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
assert_that(p.cargo("build"), execs().with_status(0).with_stdout(""));
[UPDATING] git repository `file://[..]`
[COMPILING] foo v0.1.0 (file://[..])
[COMPILING] local v0.0.1 (file://[..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
assert_that(p.cargo("build"),
[UPDATING] registry `file://[..]`
[COMPILING] foo v0.1.0 (file://[..])
[COMPILING] local v0.0.1 (file://[..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
[COMPILING] [..]
[COMPILING] [..]
[COMPILING] local v0.0.1 (file://[..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
[COMPILING] foo v0.1.1 (registry [..])
[COMPILING] bar v0.1.0 ([..])
[COMPILING] local v0.0.1 (file://[..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
assert_that(p.cargo("build"), execs().with_status(0).with_stdout(""));
[PACKAGING] foo v0.0.1 ({dir})
[VERIFYING] foo v0.0.1 ({dir})
[COMPILING] foo v0.0.1 ({dir}[..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
",
dir = p.url())));
assert_that(&p.root().join("target/package/foo-0.0.1.crate"), existing_file());
[PACKAGING] foo v0.0.1 ({dir})
[VERIFYING] foo v0.0.1 ({dir})
[COMPILING] foo v0.0.1 ({dir}[..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
",
dir = p.url())));
[PACKAGING] foo v0.0.1 ({dir})
[VERIFYING] foo v0.0.1 ({dir})
[COMPILING] foo v0.0.1 ({dir}[..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
",
dir = p.url())));
[PACKAGING] foo v0.0.1 ({dir})
[VERIFYING] foo v0.0.1 ({dir})
[COMPILING] foo v0.0.1 ({dir}[..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
",
dir = p.url())));
}
[PACKAGING] foo v0.0.1 ({dir})
[VERIFYING] foo v0.0.1 ({dir})
[COMPILING] foo v0.0.1 ({dir}[..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
",
dir = p.url())));
}
[PACKAGING] nested v0.0.1 ({dir})
[VERIFYING] nested v0.0.1 ({dir})
[COMPILING] nested v0.0.1 ({dir}[..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
",
dir = p.url())));
assert_that(&p.root().join("target/package/nested-0.0.1.crate"), existing_file());
[PACKAGING] foo v0.0.1 ({dir})
[VERIFYING] foo v0.0.1 ({dir})
[COMPILING] foo v0.0.1 ({dir}[..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
",
dir = p.url())));
execs().with_status(0)
.with_stderr(&format!("[COMPILING] baz v0.5.0 ({}/bar/baz)\n\
[COMPILING] bar v0.5.0 ({}/bar)\n\
- [COMPILING] foo v0.5.0 ({})\n",
+ [COMPILING] foo v0.5.0 ({})\n\
+ [FINISHED] debug [unoptimized + debuginfo] target(s) \
+ in [..]\n",
p.url(),
p.url(),
p.url())));
println!("building baz");
assert_that(p.cargo("build").arg("-p").arg("baz"),
execs().with_status(0)
- .with_stderr(&format!("[COMPILING] baz v0.5.0 ({}/bar/baz)\n",
+ .with_stderr(&format!("[COMPILING] baz v0.5.0 ({}/bar/baz)\n\
+ [FINISHED] debug [unoptimized + debuginfo] target(s) \
+ in [..]\n",
p.url())));
println!("building foo");
assert_that(p.cargo("build")
.arg("-p").arg("foo"),
execs().with_status(0)
.with_stderr(&format!("[COMPILING] bar v0.5.0 ({}/bar)\n\
- [COMPILING] foo v0.5.0 ({})\n",
+ [COMPILING] foo v0.5.0 ({})\n\
+ [FINISHED] debug [unoptimized + debuginfo] target(s) \
+ in [..]\n",
p.url(),
p.url())));
}
execs().with_stderr("\
[COMPILING] [..] v0.5.0 ([..])
[COMPILING] [..] v0.5.0 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]foo-[..]")
.with_stdout("
running 0 tests
assert_that(p.cargo_process("build"),
execs().with_stderr(&format!("[COMPILING] bar v0.5.0 ({}/bar)\n\
- [COMPILING] foo v0.5.0 ({})\n",
+ [COMPILING] foo v0.5.0 ({})\n\
+ [FINISHED] debug [unoptimized + debuginfo] target(s) in \
+ [..]\n",
p.url(),
p.url())));
// First time around we should compile both foo and bar
assert_that(p.cargo_process("build"),
execs().with_stderr(&format!("[COMPILING] bar v0.5.0 ({}/bar)\n\
- [COMPILING] foo v0.5.0 ({})\n",
+ [COMPILING] foo v0.5.0 ({})\n\
+ [FINISHED] debug [unoptimized + debuginfo] target(s) \
+ in [..]\n",
p.url(),
p.url())));
// This time we shouldn't compile bar
p.build(); // rebuild the files (rewriting them in the process)
assert_that(p.cargo("build"),
execs().with_stderr(&format!("[COMPILING] bar v0.5.0 ({}/bar)\n\
- [COMPILING] foo v0.5.0 ({})\n",
+ [COMPILING] foo v0.5.0 ({})\n\
+ [FINISHED] debug [unoptimized + debuginfo] target(s) \
+ in [..]\n",
p.url(),
p.url())));
}
assert_that(p.cargo_process("build"),
execs().with_stderr(&format!("[COMPILING] baz v0.5.0 ({}/baz)\n\
[COMPILING] bar v0.5.0 ({}/bar)\n\
- [COMPILING] foo v0.5.0 ({})\n",
+ [COMPILING] foo v0.5.0 ({})\n\
+ [FINISHED] debug [unoptimized + debuginfo] target(s) \
+ in [..]\n",
p.url(),
p.url(),
p.url())));
assert_that(p.cargo("build"),
execs().with_stderr(&format!("[COMPILING] baz v0.5.0 ({}/baz)\n\
[COMPILING] bar v0.5.0 ({}/bar)\n\
- [COMPILING] foo v0.5.0 ({})\n",
+ [COMPILING] foo v0.5.0 ({})\n\
+ [FINISHED] debug [unoptimized + debuginfo] target(s) \
+ in [..]\n",
p.url(),
p.url(),
p.url())));
"#).unwrap();
assert_that(p.cargo("build"),
execs().with_stderr(&format!("[COMPILING] bar v0.5.0 ({}/bar)\n\
- [COMPILING] foo v0.5.0 ({})\n",
+ [COMPILING] foo v0.5.0 ({})\n\
+ [FINISHED] debug [unoptimized + debuginfo] target(s) \
+ in [..]\n",
p.url(),
p.url())));
assert_that(p.cargo_process("build"),
execs().with_stderr(&format!("[COMPILING] baz v0.5.0 ({}/baz)\n\
[COMPILING] bar v0.5.0 ({}/bar)\n\
- [COMPILING] foo v0.5.0 ({})\n",
+ [COMPILING] foo v0.5.0 ({})\n\
+ [FINISHED] debug [unoptimized + debuginfo] target(s) \
+ in [..]\n",
p.url(),
p.url(),
p.url())));
assert_that(p.cargo_process("build"),
execs().with_stderr(&format!("[COMPILING] bar v0.5.0 ({}/src/bar)\n\
- [COMPILING] foo v0.5.0 ({})\n",
+ [COMPILING] foo v0.5.0 ({})\n\
+ [FINISHED] debug [unoptimized + debuginfo] target(s) \
+ in [..]\n",
bar,
p.url())));
sleep_ms(1000);
// This shouldn't recompile `bar`
assert_that(p.cargo("build"),
- execs().with_stderr(&format!("[COMPILING] foo v0.5.0 ({})\n",
+ execs().with_stderr(&format!("[COMPILING] foo v0.5.0 ({})\n\
+ [FINISHED] debug [unoptimized + debuginfo] target(s) \
+ in [..]\n",
p.url())));
}
assert_that(p.cargo("build"),
execs().with_stderr(&format!("[COMPILING] bar v0.5.0 ({}/bar)\n\
- [COMPILING] foo v0.5.0 ({})\n",
+ [COMPILING] foo v0.5.0 ({})\n\
+ [FINISHED] debug [unoptimized + debuginfo] target(s) in \
+ [..]\n",
p.url(),
p.url())));
assert_that(p.cargo("build"),
execs().with_stderr(&format!("[COMPILING] bar v0.5.0 ({}/bar)\n\
- [COMPILING] foo v0.5.0 ({})\n",
+ [COMPILING] foo v0.5.0 ({})\n\
+ [FINISHED] debug [unoptimized + debuginfo] target(s) in \
+ [..]\n",
p.url(),
p.url())));
assert_that(p.cargo("build")
.env("FOO", "bar"),
execs().with_status(0)
- .with_stderr(&format!("[COMPILING] foo v0.5.0 ({})\n",
- p.url())));
+ .with_stderr(&format!("[COMPILING] foo v0.5.0 ({})\n\
+ [FINISHED] debug [unoptimized + debuginfo] target(s) \
+ in [..]\n",
+ p.url())));
assert_that(p.cargo("test"),
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] [..] v0.5.0 ({url}[..])
[COMPILING] [..] v0.5.0 ({url}[..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]foo-[..]", url = p.url()))
.with_stdout("
running 0 tests
.with_stderr("\
[COMPILING] a v0.5.0 ([..])
[COMPILING] foo v0.5.0 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
assert_that(p.cargo("build")
execs().with_status(0)
.with_stderr("\
[COMPILING] b v0.5.0 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
[COMPILING] a2 v0.5.0 ([..])
[COMPILING] a1 v0.5.0 ([..])
[COMPILING] b v0.5.0 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
--emit=dep-info,link \
-L dependency={dir}{sep}target{sep}debug \
-L dependency={dir}{sep}target{sep}debug{sep}deps`
+[FINISHED] debug [optimized] target(s) in [..]
", sep = SEP,
dir = p.root().display(),
url = p.url(),
--extern foo={dir}{sep}target{sep}release{sep}deps{sep}\
{prefix}foo-[..]{suffix} \
--extern foo={dir}{sep}target{sep}release{sep}deps{sep}libfoo-[..].rlib`
+[FINISHED] release [optimized + debuginfo] target(s) in [..]
",
dir = p.root().display(),
url = p.url(),
[PACKAGING] foo v0.0.1 ({dir})
[VERIFYING] foo v0.0.1 ({dir})
[COMPILING] foo v0.0.1 [..]
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[UPLOADING] foo v0.0.1 ({dir})
[WARNING] aborting upload due to dry run
",
[DOWNLOADING] bar v0.0.1 (registry file://[..])
[COMPILING] bar v0.0.1 (registry file://[..])
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..] secs
",
dir = p.url(),
reg = registry::registry())));
[UPDATING] registry `{reg}`
[..] bar v0.0.1 (registry file://[..])
[..] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..] secs
",
dir = p.url(),
reg = registry::registry())));
[COMPILING] baz v0.0.1 (registry file://[..])
[COMPILING] bar v0.0.1 (registry file://[..])
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..] secs
",
dir = p.url(),
reg = registry::registry())));
[DOWNLOADING] notyet v0.0.1 (registry file://[..])
[COMPILING] notyet v0.0.1 (registry file://[..])
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..] secs
",
dir = p.url(),
reg = registry::registry())));
[DOWNLOADING] notyet v0.0.1 (registry file://[..])
[COMPILING] notyet v0.0.1 (registry file://[..])
[COMPILING] foo v0.0.1 ({dir}[..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..] secs
", dir = p.url())));
}
[DOWNLOADING] bar v0.0.1 (registry file://[..])
[COMPILING] bar v0.0.1 (registry file://[..])
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..] secs
",
dir = p.url())));
[COMPILING] baz v0.0.1 (registry file://[..])
[COMPILING] bar v0.0.1 (registry file://[..])
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..] secs
",
dir = p.url())));
[COMPILING] baz v0.0.1 (registry file://[..])
[COMPILING] bar v0.0.1 (registry file://[..])
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..] secs
",
dir = p.url())));
}
execs().with_status(0).with_stderr("\
[UPDATING] registry `[..]`
[DOWNLOADING] bar v0.0.1 (registry file://[..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..] secs
"));
}
[DOWNLOADING] [..] v0.0.2 (registry file://[..])
[COMPILING] bar v0.0.2 (registry file://[..])
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..] secs
",
dir = p.url())));
[DOWNLOADING] [..] v0.0.3 (registry file://[..])
[COMPILING] bar v0.0.3 (registry file://[..])
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..] secs
",
dir = p.url())));
[DOWNLOADING] [..] v0.0.1 (registry file://[..])
[COMPILING] bar v0.0.1 (registry file://[..])
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..] secs
",
dir = p.url())));
}
[COMPILING] bar v0.0.1 (registry file://[..])
[COMPILING] a v0.0.1 ({dir}/a)
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..] secs
",
dir = p.url())));
[COMPILING] bar v0.1.0 (registry file://[..])
[COMPILING] a v0.0.1 ({dir}/a)
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..] secs
",
dir = p.url())));
}
[COMPILING] a v0.0.1 (registry [..])
[COMPILING] b v0.0.1 ([..])
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..] secs
",
dir = p.url())));
p.root().move_into_the_past();
[DOWNLOADING] a v0.1.1 (registry file://[..])
[COMPILING] a v0.1.1 (registry [..])
[COMPILING] foo v0.5.0 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..] secs
",
dir = p.url())));
[COMPILING] b v0.1.1 (registry [..])
[COMPILING] a v0.1.0 (registry [..])
[COMPILING] foo v0.5.0 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..] secs
"));
}
[DOWNLOADING] baz v0.1.0 ([..])
[COMPILING] baz v0.1.0 ([..])
[COMPILING] bar v0.5.0 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..] secs
"));
}
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `target{sep}debug{sep}foo[..]`", dir = path2url(p.root()), sep = SEP))
.with_stdout("\
hello
execs().with_status(2)
.with_stderr("\
[COMPILING] foo v0.0.1 (file[..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `target[..]`
[ERROR] Process didn't exit successfully: `target[..]foo[..]` (exit code: 2)
"));
.with_stderr("\
[COMPILING] foo v0.0.1 (file[..])
[RUNNING] `rustc [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `target[..]`
[ERROR] Process didn't exit successfully: `target[..]foo[..]` (exit code: 2)
"));
[COMPILING] foo v0.0.1 ({dir})
[RUNNING] `rustc src[..]lib.rs [..]`
[RUNNING] `rustc src[..]a.rs [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `target{sep}debug{sep}a[..]`", dir = path2url(p.root()), sep = SEP))
.with_stdout("\
hello a.rs
.with_stderr(&format!("\
[COMPILING] foo v0.0.1 ([..])
[RUNNING] `rustc src[..]b.rs [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `target{sep}debug{sep}b[..]`", sep = SEP))
.with_stdout("\
hello b.rs
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `target{sep}debug{sep}examples{sep}a[..]`", dir = path2url(p.root()), sep = SEP))
.with_stdout("\
example
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `target{sep}debug{sep}main[..]`", dir = path2url(p.root()), sep = SEP))
.with_stdout("\
hello main.rs
-L dependency={dir}{sep}target{sep}release \
-L dependency={dir}{sep}target{sep}release{sep}deps \
--extern bar={dir}{sep}target{sep}release{sep}deps{sep}libbar-[..].rlib`
+[FINISHED] release [optimized] target(s) in [..]
[RUNNING] `target{sep}release{sep}examples{sep}a[..]`
",
dir = p.root().display(),
-L dependency={dir}{sep}target{sep}debug \
-L dependency={dir}{sep}target{sep}debug{sep}deps \
--extern bar={dir}{sep}target{sep}debug{sep}deps{sep}libbar-[..].rlib`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `target{sep}debug{sep}examples{sep}a[..]`
",
dir = p.root().display(),
assert_that(p.cargo_process("run").arg("--release"),
execs().with_status(0).with_stderr(&format!("\
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] release [optimized] target(s) in [..]
[RUNNING] `target{sep}release{sep}foo[..]`
",
dir = path2url(p.root()),
assert_that(p.cargo("run").cwd(cwd),
execs().with_status(0)
.with_stderr(&format!("\
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]\n\
[RUNNING] `.{sep}foo[..]`", sep = SEP))
.with_stdout("\
hello
--emit=dep-info,link \
-L dependency={dir}{sep}target{sep}debug \
-L dependency={dir}{sep}target{sep}debug{sep}deps`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", sep = SEP,
dir = p.root().display(), url = p.url())));
}
--emit=dep-info,link \
-L dependency={dir}{sep}target{sep}debug \
-L dependency={dir}{sep}target{sep}debug{sep}deps`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", sep = SEP,
dir = p.root().display(), url = p.url())))
}
-L dependency={dir}{sep}target{sep}debug \
-L dependency={dir}{sep}target{sep}debug{sep}deps \
--extern {name}={dir}{sep}target{sep}debug{sep}lib{name}.rlib`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", sep = SEP,
dir = p.root().display(), url = p.url(),
name = "foo", version = "0.0.1")));
--out-dir {dir}{sep}target{sep}debug [..]`
[RUNNING] `rustc src{sep}bin{sep}bar.rs --crate-name bar --crate-type bin -g \
-C debug-assertions [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", sep = SEP,
dir = p.root().display(), url = p.url())));
}
--out-dir {dir}{sep}target{sep}debug [..]`
[RUNNING] `rustc tests{sep}bar.rs --crate-name bar -g \
-C debug-assertions [..]--test[..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", sep = SEP,
dir = p.root().display(), url = p.url())));
}
[RUNNING] `[..] -g -C [..]`
[COMPILING] foo v0.0.1 ({url})
[RUNNING] `[..] -g -C debug-assertions [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
",
url = foo.url())));
}
.with_stderr("\
[COMPILING] bar v0.1.0 ([..])
[RUNNING] `[..]--crate-name bar --crate-type lib [..] -C debug-assertions [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
-o {dir}{sep}target{sep}doc \
-L dependency={dir}{sep}target{sep}debug \
-L dependency={dir}{sep}target{sep}debug{sep}deps`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", sep = SEP,
dir = p.root().display(), url = p.url())));
}
--no-defaults \
-L dependency={dir}{sep}target{sep}debug \
-L dependency={dir}{sep}target{sep}debug{sep}deps`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", sep = SEP,
dir = p.root().display(), url = p.url())));
}
-L dependency={dir}{sep}target{sep}debug \
-L dependency={dir}{sep}target{sep}debug{sep}deps \
--extern [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", sep = SEP,
dir = foo.root().display(), url = foo.url())));
}
--no-defaults \
-L dependency={dir}{sep}target{sep}debug{sep}deps \
-L dependency={dir}{sep}target{sep}debug{sep}deps`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", sep = SEP,
dir = foo.root().display())));
}
assert_that(p.cargo("test"),
execs().with_stderr(format!("\
[COMPILING] foo v0.5.0 ({})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]foo-[..]", p.url()))
.with_stdout("
running 1 test
[RUNNING] [..] -C opt-level=3 [..]
[RUNNING] [..] -C opt-level=3 [..]
[RUNNING] [..] -C opt-level=3 [..]
+[FINISHED] release [optimized] target(s) in [..]
[RUNNING] `[..]target[..]foo-[..]`
[RUNNING] `[..]target[..]test-[..]`
[DOCTEST] foo
execs().with_stderr(format!("\
[COMPILING] foo v0.5.0 ({url})
[RUNNING] `rustc src[..]foo.rs [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `[..]target[..]foo-[..] hello`", url = p.url()))
.with_stdout("
running 1 test
assert_that(p.cargo("test"),
execs().with_stderr(format!("\
[COMPILING] foo v0.5.0 ({url})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]foo-[..]
[ERROR] test failed", url = p.url()))
.with_stdout_contains("
assert_that(p.cargo_process("test"),
execs().with_stderr(format!("\
[COMPILING] foo v0.0.1 ({})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]baz-[..]
[RUNNING] target[..]foo[..]
[DOCTEST] foo", p.url()))
.with_stderr(&format!("\
[COMPILING] foo v0.0.1 ([..])
[COMPILING] bar v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]
[DOCTEST] bar", dir = p.url()))
.with_stdout("
assert_that(p.cargo_process("test"),
execs().with_stderr(format!("\
[COMPILING] foo v0.0.1 ({})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]foo-[..]
[RUNNING] target[..]test-[..]
[DOCTEST] foo", p.url()))
assert_that(p.cargo_process("test"),
execs().with_stderr(format!("\
[COMPILING] foo v0.0.1 ({})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]external-[..]
[RUNNING] target[..]foo-[..]
[DOCTEST] foo", p.url()))
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]foo-[..]
[DOCTEST] foo", dir = p.url()))
.with_stdout("
assert_that(p.cargo("test").arg("foo"),
execs().with_status(0)
.with_stderr("\
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]foo-[..]
[DOCTEST] foo")
.with_stdout("
assert_that(p.cargo_process("test"),
execs().with_stderr(format!("\
[COMPILING] foo v0.0.1 ({})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]foo-[..]
[RUNNING] target[..]foo-[..]
[DOCTEST] foo", p.url()))
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] syntax v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]syntax-[..]
[RUNNING] target[..]test-[..]
[DOCTEST] syntax", dir = p.url()))
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] syntax v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]syntax-[..]", dir = p.url()))
.with_stdout("
running 1 test
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] syntax v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]syntax-[..]", dir = p.url()))
.with_stdout("
running 1 test
.with_stderr(&format!("\
[COMPILING] bar v0.0.1 ({dir}/bar)
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]foo-[..]
[RUNNING] target[..]test-[..]", dir = p.url()))
.with_stdout("
assert_that(p.cargo("test"),
execs().with_status(0)
.with_stderr("\
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]foo-[..]
[RUNNING] target[..]test-[..]")
.with_stdout("
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]foo-[..]
[DOCTEST] foo", dir = p.url()))
.with_stdout("
assert_that(p.cargo("test"),
execs().with_status(0)
.with_stderr("\
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]foo-[..]
[DOCTEST] foo")
.with_stdout("
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]foo-[..]
[DOCTEST] foo", dir = p.url()))
.with_stdout("
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
",
dir = p.url())));
}
execs().with_status(0)
.with_stderr(format!("\
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]bin2-[..]", dir = prj.url()))
.with_stdout("
running 1 test
execs().with_status(0)
.with_stderr(format!("\
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]b-[..]", dir = prj.url()))
.with_stdout("
running 1 test
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]bar-[..]
",
dir = p.url())));
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] d1 v0.0.1 ({dir}/d1)
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]d1-[..]
[RUNNING] target[..]d1-[..]", dir = p.url()))
.with_stdout("
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] d2 v0.0.1 ({dir}/d2)
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]d2-[..]
[RUNNING] target[..]d2-[..]", dir = p.url()))
.with_stdout("
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] foo v0.0.1 ({dir})
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]foo-[..]", dir = p.url()))
.with_stdout("
running 0 tests
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] d1 v0.0.1 ({dir}/d1)
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]deps[..]d1[..]
[DOCTEST] d1", dir = p.url()))
.with_stdout("
[COMPILING] foo v0.0.1 ({dir})
[RUNNING] `rustc [..]`
[RUNNING] `rustc [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", dir = p.url())));
assert_that(&p.bin("foo"), is_not(existing_file()));
execs().with_status(0)
.with_stderr("\
[COMPILING] foo v0.0.1 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] [..]")
.with_stdout("\
bin
[..]
[..]
[RUNNING] `rustc [..] --crate-name ex [..] --extern a=[..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
execs().with_status(0)
.with_stderr("\
[COMPILING] foo [..]
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]foo[..]
[DOCTEST] foo")
.with_stdout("
assert_that(p.cargo_process("test").arg("--test=foo"),
execs().with_stderr("\
[COMPILING] foo v0.0.1 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]debug[..]foo[..]")
.with_stdout("
running 0 tests
assert_that(p.cargo_process("test"),
execs().with_stderr("\
[COMPILING] foo v0.0.1 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[DOCTEST] foo")
.with_stdout("
running 1 test
execs().with_stderr("\
[COMPILING] foo v0.0.1 ([..])
[COMPILING] bar v0.0.1 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]foo[..]
[DOCTEST] foo")
.with_stdout("
execs().with_status(101)
.with_stderr_contains("\
[COMPILING] foo v0.0.1 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]foo[..]
[RUNNING] target[..]test_add_one[..]")
.with_stdout_contains("
[COMPILING] foo v0.0.1 ([..])
[RUNNING] `rustc src[..]main.rs [..]`
[RUNNING] `rustc src[..]main.rs [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
[COMPILING] a v0.0.1 ([..])
[RUNNING] `rustc a[..]src[..]lib.rs [..]`
[RUNNING] `rustc a[..]src[..]lib.rs [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
execs().with_status(0)
.with_stderr("\
[COMPILING] foo v0.0.1 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[DOCTEST] foo")
.with_stdout("
running 1 test
.with_stderr("\
[COMPILING] foo v0.0.1 ([..])
[RUNNING] `rustc [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `[..]`
"));
}
execs().with_stderr(&format!("\
[COMPILING] foo v0.0.1 ({url})
[RUNNING] `rustc [..] -C ar=nonexistent-ar -C linker=nonexistent-linker [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", url = foo.url())))
}
execs().with_stderr(&format!("\
[COMPILING] foo v0.0.1 ({url})
[RUNNING] `rustc [..] -C ar={ar} -C linker={linker} [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", url = foo.url(), ar = output.0, linker = output.1)))
}
execs().with_stderr(&format!("\
[COMPILING] foo v0.0.1 ({url})
[RUNNING] `rustc [..] -C ar={ar} -C linker={linker} [..]`
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", url = foo_url, ar = output.0, linker = output.1)))
}
[DOWNLOADING] dep1 v0.1.3 ([..])
[COMPILING] dep1 v0.1.3 ([..])
[COMPILING] foo v0.1.0 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
[DOWNLOADING] dep2 v0.1.0 ([..])
[COMPILING] dep2 v0.1.0 ([..])
[COMPILING] foo v0.1.0 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
assert_that(p.cargo("build").cwd(p.root().join("bar")),
[DOWNLOADING] dep1 v0.1.0 ([..])
[COMPILING] dep1 v0.1.0 ([..])
[COMPILING] bar v0.1.0 ([..])
+[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}